package com.briup.cms.config;

import com.briup.cms.log.DefaultLoggingAccessPersistingImpl;
import com.briup.cms.log.LoggingAccessAspectResolver;
import com.briup.cms.log.LoggingAccessPersisting;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 日志功能的配置类
 */
@Configuration
public class LoggingConfig {

	@Bean
    public LoggingAccessAspectResolver loggingAccessAspectResolver(LoggingAccessPersisting loggingAccessPersisting) {
		return new LoggingAccessAspectResolver(loggingAccessPersisting);
    }

    @Bean
    public LoggingAccessPersisting loggingAccessPersisting() {
        return new DefaultLoggingAccessPersistingImpl();
    }
}